function weblogin(){
	var tid=$("#tid").attr("value");
	var pwd=$("#pwd").attr("value");
	//alert("ok");
	if(tid=="用户名"&&pwd=="Password"){
		alert("不能为空");
	}
	//var jsonstr='{"pwd":"'+pwd+'","tid":"'+tid+'"}';
	$.ajax({
		type:"POST",
		contentType: "application/x-www-form-urlencoded",
		url:"http://wikewechat.sinaapp.com/Admin/Login/login",
		//url:"http://www.baidu.com",
		//'email':tid,'password':pwd
		data:{'email':tid,'password':pwd},
		dataType:'html',
		//callback:"callbackAction",
		success:function(data){
			//alert(data);
			window.location.href ="http://wikewechat.sinaapp.com/Admin/Index/index";
			/*var jsonobj=eval('('+data+')');
			if(jsonobj.flag==1){
				
				$.cookie("tid", tid);
				$.cookie("tname", decodeURIComponent(jsonobj.name));
				$.cookie("coursenum", jsonobj.data.length);
				var a,b;
				for(a=0;a<jsonobj.data.length;a++){
					$.cookie("course_"+a+"_id",decodeURIComponent(jsonobj.data[a].groupid));
					$.cookie("course_"+a+"_name",decodeURIComponent(jsonobj.data[a].groupname));
					$.cookie("course_"+a+"_member",jsonobj.data[a].member.length);
					for(b=0;b<jsonobj.data[a].member.length;b++){
						$.cookie("course_"+a+"_"+b+"_id",jsonobj.data[a].member[b].memberid);
						$.cookie("course_"+a+"_"+b+"_name",jsonobj.data[a].member[b].name);
					}
				}

				window.location.href=jsonobj.url;
			}
			else window.location.href="http://120.24.39.99/teh/webhtml/index.html";*/
        }
	 });
}

function mnsubmit(){document.getElementById("loginform").submit();}

function showqr(key){
	$('#qrcode').empty();
	$('#qrcode').qrcode({
		render: "table", //table方式 
		width: 250, //宽度 
		height:250, //高度
		//text:"http://192.168.199.163:8080/smartEducation/sweepQr?key="+key
		text:"http://120.24.39.99:8080/smartEducation/sweepQr?key="+key
	});
}
